home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / DEMOS / XP-XCP13.ZIP / RELEASE.ASM < prev    next >
Encoding:
Assembly Source File  |  1997-02-26  |  28.0 KB  |  732 lines

  1. COMMENT ■
  2.  
  3.                            Read the info file
  4.  
  5.  
  6. LOCALS
  7. .model tiny
  8. .386
  9.  
  10. codesegm        segment byte public 'code' use16
  11.                 org     100h
  12.                 assume  cs:codesegm, ds:codesegm
  13.  
  14. s:              call    setstack
  15.  
  16. ; timer routine adapted from fc's starport 2 add.
  17. inittimer       proc
  18.                 push    0
  19.                 pop     fs
  20.                 mov     eax,fs:[8*4]            ;read old timer int.
  21.                 mov     oldint8,eax             ;save it
  22.                 mov     ax,cs
  23.                 shl     eax,16
  24.                 mov     ax,offset intti8        ;address of new timer int
  25.                 mov     dx,23863 ;50Hz          ;frame rate
  26.                 jmp     @@1                     ;when in init
  27. deinittimer:    mov     eax,ds:oldint8          ;set address of old int
  28.                 xor     dx,dx                   ;set timer to 18.2Hz
  29. @@1:            cli
  30.                 mov     fs:[8*4],eax            ;set new interrupt
  31.                 mov     al,036h
  32.                 out     43h,al                  ;adjust pit commands
  33.                 mov     al,dl
  34.                 out     40h,al                  ;adjust speed
  35.                 mov     al,dh
  36.                 out     40h,al                  ;here too
  37.                 sti
  38.                 ret
  39. inittimer       endp
  40.  
  41. intti8          proc far ;timer interrupt
  42.                 push    ax                      ;only ax used
  43.                 inc     cs:rot                  ;bitmap rotation
  44.                 inc     byte ptr cs:sin1        ;moving sin curve
  45.                 sub     byte ptr cs:sin2,3
  46.                 add     byte ptr cs:sin3,2
  47.                 inc     word ptr cs:textcounter ;advance text position counting
  48.                 mov     ax,cs:dist
  49.                 add     ax,cs:ddi
  50.                 mov     cs:dist,ax              ;bitmap zooming
  51.                 cmp     ax,355
  52.                 jge     @@Kk1
  53.                 cmp     ax,1
  54.                 jg      @@cont
  55.                 mov     ax,cs:imageoffs
  56.                 sub     ax,offset Imagedata
  57.                 add     ax,1024
  58.                 and     ax,0fffh
  59.                 add     ax,offset Imagedata
  60.                 mov     cs:imageoffs,ax
  61. @@Kk1:          neg     cs:ddi                  ;if at limit, change direction
  62. @@cont:         mov     al,20h                  ;tell pic new interrupts are
  63.                 out     20h,al                  ; allowed
  64.                 pop     ax
  65.                 iret
  66. intti8          endp
  67.  
  68. setstack        proc                            ;this routine sets the stack
  69.                 inc     bp                      ;the way we want it.
  70.                 pop     ax
  71.                 inc     bx
  72.                 inc     bp
  73.                 push    ax
  74.                 push    sp
  75.                 dec     cx
  76.                 dec     di
  77.                 dec     si
  78.                 sbb     cl,bl
  79.                 pop     es
  80.                 pop     di
  81.                 jmp     [cs:retard]
  82. setstack        endp
  83.  
  84. startaddr       proc    near            ;start addr in cs:curadd
  85.                 mov     dx,3dah
  86. @@WaitDE:       in      al,dx           ;wait until retrace not in progress
  87.                 test    al,01h
  88.                 jnz     @@WaitDE
  89.                 mov     bx,cs:curadd
  90.                 mov     dx,3d4h
  91.                 mov     al,0dh
  92.                 mov     ah,bl
  93.                 out     dx,ax           ;tell crtc start addr data coming
  94.                 dec     al
  95.                 mov     ah,bh
  96.                 out     dx,ax           ;send start adress
  97.                 mov     dx,3dah
  98. @@WaitVS:       in      al,dx           ;vertical retrace?
  99.                 test    al,08h
  100.                 jz      @@WaitVS
  101.                 ret
  102. startaddr       endp
  103.  
  104. MakeSintbl      proc
  105.                 mov     di,offset sintbl;load destination in es:di
  106.                 mov     si,offset sinbasetbl    ;we assume ds is right
  107.                 mov     dx,64
  108.                 mov     cx,dx           ;then we toy around with our
  109.                                         ;sin table.
  110.                 sub     ah,ah
  111. @@Looppi1:      lodsb
  112.                 stosw
  113.                 loop    @@Looppi1
  114.                 mov     cx,dx
  115. @@Looppi2:      std
  116.                 lodsb
  117.                 cld
  118.                 stosw
  119.                 loop    @@Looppi2
  120.                 mov     cx,dx
  121.                 shl     cx,1
  122.                 mov     si,offset sintbl
  123. @@Looppi3:      lodsw
  124.                 neg     ax
  125.                 stosw
  126.                 loop    @@Looppi3
  127.                 ret
  128. MakeSintbl      endp
  129.  
  130. DrawScreen      proc            ;cl=rot, ax=scale, dx=y, bx=x
  131.                 push    bx
  132.                 push    dx
  133.                 sub     ch,ch
  134.                 push    cx
  135.                 mov     si,cx
  136.                 shl     si,1            ;si points to sin table
  137.                 mov     di,64
  138.                 sub     di,cx
  139.                 and     di,255
  140.                 shl     di,1            ;di points to cos table
  141.                 mov     cx,[di+offset sintbl]
  142.                 mov     bx,ax           ;store scale in bx
  143.                 imul    cx
  144.                 shl     eax,16
  145.                 mov     ax,dx
  146.                 rol     eax,16
  147.                 shr     eax,5           ;/32
  148.                 mov     ddx,ax          ;ddx=Temp;
  149.  
  150.                 mov     cx,[si+offset sintbl]
  151.                 mov     ax,bx
  152.                 imul    cx
  153.                 shl     eax,16
  154.                 mov     ax,dx
  155.                 rol     eax,16
  156.                 shr     eax,8           ;Temp=SinTable[rot]*scale / 256;
  157.                 mov     ddy,ax          ;ddy=Temp;
  158.  
  159.                 pop     cx
  160.                 mov     si,cx
  161.                 add     si,64
  162.                 and     si,255
  163.                 shl     si,1            ;si points to sin table again
  164.                 sub     di,di
  165.                 sub     di,cx
  166.                 and     di,255
  167.                 shl     di,1            ;di points to cos table again
  168.  
  169.                 mov     ax,bx
  170.                 mov     cx,[di+offset sintbl]
  171.                 imul    cx
  172.                 shl     eax,16
  173.                 mov     ax,dx
  174.                 rol     eax,16
  175.                 shr     eax,5           ;/32
  176.                 mov     d2x,ax          ;d2x=temp;
  177.  
  178.                 mov     ax,bx
  179.                 mov     cx,[si+offset sintbl]
  180.                 imul    cx
  181.                 shl     eax,16
  182.                 mov     ax,dx
  183.                 rol     eax,16
  184.                 shr     eax,8           ;Temp=Sin2Table[rot]*scale / 256;
  185.                 mov     d2y,ax          ;d2y=temp;
  186.  
  187.  
  188.                 mul     roty            ;rotate around the center of the screen
  189.                 mov     cx,ax           ;move d2y*100 into cx
  190.                 mov     ax,ddy
  191.                 mul     rotx            ;rotate around the center of the screen
  192.                 pop     dx              ;move y into dx
  193.                 sub     dx,ax
  194.                 sub     dx,cx           ;j=y-ddy*160-d2y*100;
  195.                 mov     j,dx
  196.  
  197.                 mov     ax,d2x
  198.                 mul     roty            ;rotate around the center of the screen
  199.                 mov     cx,ax           ;move d2y*100 into cx
  200.                 mov     ax,ddx
  201.                 mul     rotx            ;rotate around the center of the screen
  202.                 pop     dx              ;move y into dx
  203.                 sub     dx,ax
  204.                 sub     dx,cx           ;i=x-ddx*160-d2x*100;
  205.                 mov     i,dx
  206.  
  207.                 mov     di,curadd       ;set counter to upperleft corner of
  208.                                         ;screen
  209.                 push    0a000h
  210.                 pop     es              ;set es to videomem
  211.                 mov     cx,200          ;number of rows on screen
  212. vloop:          mov     gs,cx           ;use gs instead of stack <grin>
  213.                 mov     dx,i            ;start scanning the bitmap in (i,j)
  214.                 mov     ax,j            ;which were calculated before
  215.                 mov     cx,8            ;Number of columns on screen
  216. hloop:          mov     fs,cx           ;use fs instead of stack <grin>
  217.                 mov     cx,16           ;16 bits in a word (oh really?)
  218. @@Looppi:       add     dx,[ddx]        ;add 'right' vector to the current
  219.                 add     ax,[ddy]        ;bitmap coordinates. 8.8 fixed point
  220.  
  221.                 sub     bh,bh
  222.                 mov     bl,ah
  223.                 shl     bx,5            ;multiply by 32 (32)
  224.                 mov     bp,dx
  225.                 shr     bp,11           ;bp=x/1024
  226.                 add     bx,bp
  227.  
  228.                 and     bx,03ffh                ;and with size of the picture -1
  229.                 add     bx,imageoffs
  230.                 mov     bl,[bx]                 ;get the byte
  231.                 sub     bh,bh
  232.                 shl     si,1
  233.                 or      si,bx           ;put it in our temporary word
  234.                 loop    @@Looppi
  235.                 mov     cx,fs           ;reload cx from fs
  236.                 mov     bx,si
  237.                 xchg    bl,bh           ;funny byte order toying
  238.                 mov     es:[di],bx
  239.                 add     di,2
  240.                 loop    hloop           ;end of horiz loop
  241.                 add     di,24
  242.                 mov     ax,d2x
  243.                 add     i,ax            ;i and j are the starting coords for
  244.                                         ;the line
  245.                 mov     ax,d2y
  246.                 add     j,ax
  247.                 mov     cx,gs           ;restore the vloop count
  248.                 loop    vloop
  249.                 ret
  250. DrawScreen      endp
  251.  
  252. SinPlane        proc    ;dest. in di
  253.                 push    0a000h
  254.                 pop     es
  255.                 sub     si,si
  256.                 mov     dx,3c4h
  257.                 mov     ax,0402h
  258.                 out     dx,ax           ;select output plane
  259.                 mov     dx,200
  260. @@spl0:         mov     ax,[si+offset sintbl]
  261.                 add     si,10
  262.                 and     si,511
  263.                 sar     ax,4
  264.                 add     ax,113          ;true x-coordinate
  265.                 mov     bx,ax
  266.                 shr     bx,3            ;real address of first byte
  267.                 mov     cl,al
  268.                 and     cl,7
  269.                 mov     al,0ffh         ;first byte
  270.                 shr     al,cl
  271.                 add     di,bx           ;put it in di
  272.                 stosb                   ;output first byte
  273.                 mov     cx,39
  274.                 sub     cx,bx
  275.                 mov     al,0ffh
  276.                 rep     stosb           ;output the rest
  277.                 dec     dx
  278.                 jnz     @@spl0
  279.                 ret
  280. SinPlane        endp
  281.  
  282. SinPlane2       proc
  283.                 push    0a000h
  284.                 pop     es
  285.                 mov     di,curadd
  286.                 mov     si,word ptr rot
  287.                 shl     si,2
  288.                 and     si,511
  289.                 mov     dx,3c4h
  290.                 mov     ax,0202h
  291.                 out     dx,ax           ;select output plane
  292.                 mov     dx,200
  293. @@spl0:         mov     bx,sin1
  294.                 shl     bx,1
  295.                 add     bx,si
  296.                 and     bx,511
  297.                 mov     ax,[bx+offset sintbl]
  298.                 mov     bx,sin2
  299.                 shl     bx,1
  300.                 add     bx,si
  301.                 and     bx,511
  302.                 mov     ax,[bx+offset sintbl]
  303.                 mov     bx,sin3
  304.                 shl     bx,1
  305.                 add     bx,si
  306.                 add     bx,si
  307.                 and     bx,511
  308.                 add     ax,[bx+offset sintbl]
  309.  
  310.                 add     si,4
  311.                 and     si,511          ;read sin in ax
  312.                 sar     ax,4            ;divide by 16, now it's -x..x (?)
  313.                 add     ax,64           ;true x-coordinate
  314.                 mov     bx,ax
  315.                 shr     bx,3            ;real address of first byte
  316.                 mov     cx,bx
  317.                 push    ax
  318.                 sub     al,al
  319.                 rep     stosb           ;write until first byte
  320.                 pop     ax
  321.                 mov     cl,al
  322.                 and     cl,7
  323.                 mov     al,0ffh         ;first byte
  324.                 shr     al,cl
  325.                 mov     cs:retard,offset endit
  326.                 stosb                   ;output first byte
  327.                 mov     cx,20
  328.                 mov     ah,al
  329.                 mov     al,0ffh
  330.                 rep     stosb           ;constant width
  331.                 mov     al,ah
  332.                 not     al
  333.                 stosb                   ;last byte
  334.                 mov     cx,18
  335.                 sub     cx,bx
  336.                 sub     al,al
  337.                 rep     stosb
  338.                 dec     dx
  339.                 jnz     @@spl0
  340.                 ret
  341. SinPlane2       endp
  342.  
  343. decode          proc    ;si=bit "packed" buffer addr, di=dest. for byte data
  344.                 mov     bp,512          ;this decodes 64x64x2 stuff
  345. @@perbyte:      lodsb                   ;load next byte
  346.                 mov     dl,al           ;move into dl for storage
  347.                 mov     bx,7            ;first bit
  348.                 mov     cx,8            ;run 8 times per byte
  349. @@perbit:       bt      dx,bx           ;set cf if bit bx is set in dx
  350.                 setc    al              ;if cf, set al=1, else al=0
  351.                 stosb                   ;stash that byte
  352.                 dec     bx              ;next bit
  353.                 loop    @@perbit        ;next bit
  354.                 dec     bp
  355.                 jnz     @@perbyte       ;next byte
  356.                 ret
  357. decode          endp
  358.  
  359. calvin          proc    ;draws calvin on the screen, es:di where to
  360.                 mov     dx,3c4h
  361.                 mov     ax,0402h
  362.                 out     dx,ax           ;select output plane
  363.                 mov     si,offset calvpic
  364.                 mov     dx,62
  365. @@y:            mov     cx,19
  366.                 rep     movsb
  367.                 add     di,40-19
  368.                 dec     dx
  369.                 jnz     @@y
  370.                 ret
  371. calvin          endp
  372.  
  373. start:          mov     ax,01130h
  374.                 mov     bh,3
  375.                 int     10h                     ; es:bp = 8x8 font
  376.                 push    es
  377.                 pop     ds
  378.                 mov     si,bp                   ; ds:si = es:bp
  379.                 push    cs
  380.                 pop     es
  381.                 mov     di,offset biosfont      ; es:di = font
  382.                 mov     cx,2048
  383.                 rep     movsw
  384.  
  385.                 push    cs
  386.                 pop     ds
  387.                 push    cs
  388.                 pop     es
  389.  
  390.                 mov     si,offset encoded_1
  391.                 mov     di,offset imagedata
  392.                 call    decode
  393.  
  394.                 call    MakeSintbl
  395.  
  396.                 mov     ax,0Dh                 ;320x200x16 (EGA/VGA)
  397.                 int     10h
  398.  
  399.                 mov     ax,1000h
  400.         sub    bx,bx
  401.         mov    cx,16
  402. @kalapal:    pusha
  403.         int    10h
  404.         popa
  405.         inc    bl
  406.         inc    bh
  407.                 loop    @kalapal                ;remap the palette positions
  408.                 mov     cx,48
  409.                 sub     al,al
  410.                 mov     dx,3c8h
  411.                 out     dx,al
  412.                 inc     dx
  413.                 mov     si,offset palette
  414.                 rep     outsb                   ;output the funny palette
  415.  
  416.                 mov     ax,cs
  417.                 add     ax,5120                 ;select text buffer segment
  418.                 mov     textseg,ax
  419.  
  420.                 sub     di,di                   ;stuff first page's sin
  421.                 call    sinplane                ; curve
  422.                 mov     di,8192                 ;stuff second page
  423.                 call    sinplane
  424.  
  425.                 mov     di,130*40+19
  426.                 call    calvin
  427.                 mov     di,8192+(130*40+19)
  428.                 call    calvin
  429.  
  430.                 call    inittimer               ;put the jolly timer to work
  431.  
  432. @@Loooppi:      mov     dx,03c4h
  433.                 mov     ax,0102h
  434.                 out     dx,ax
  435.  
  436.                 mov     ax,dist
  437.                 mov     cl,rot
  438.                 mov     dx,y
  439.                 mov     bx,x
  440.                 call    DrawScreen              ;do the bitmap `thing'
  441.  
  442.                 call    sinplane2               ;the changing sin tbl
  443.  
  444.                 mov     cx,textcounter
  445.                 and     cx,cx
  446.                 jz      @@endofloop
  447. @@doggie:       push    cx                      ;we're 100% sure cx will be
  448.                                                 ;modified
  449.                 cmp     textstat1,0             ;are we going in?
  450.                 jne     @@nottextin             ;no, do something else
  451.                 cmp     textstat2,200           ;first frame?
  452.                 jne     @@nocreate              ;no, do something else
  453.                 call    text                    ;create text
  454. @@nocreate:     mov     ax,textcury
  455.                 add     ax,textcdir
  456.                 mov     textcury,ax
  457.                 dec     textstat2
  458.                 jnz     @@andnext
  459.                 inc     textstat1
  460.                 mov     textstat2,50*4
  461.                 jmp     @@andnext
  462. @@nottextin:    cmp     textstat1,1
  463.                 jne     @@notwait
  464.                 dec     textstat2
  465.                 jnz     @@andnext
  466.                 inc     textstat1
  467.                 mov     textstat2,200
  468.                 jmp     @@andnext
  469. @@notwait:      mov     ax,textcury
  470.                 add     ax,textcdir
  471.                 mov     textcury,ax
  472.                 dec     textstat2
  473.                 jnz     @@andnext
  474.                 mov     textstat1,0
  475.                 mov     textstat2,200
  476. @@andnext:      pop     cx
  477.                 loop    @@doggie
  478. @@endofloop:    mov     word ptr textcounter,0  ;restart looping
  479.                 call    outputtext
  480.  
  481.                 call    startaddr
  482.                 xor     curadd,8192
  483.                 mov     ah,01
  484.                 int     16h
  485.                 jz      @@Loooppi
  486.  
  487. @@Endi:         push    0
  488.                 pop     fs
  489.                 call    deinittimer             ;remove the timer
  490.                 call    setstack                ;set the stack to normal
  491. endit:          mov     ax,03h                  ;reset video mode
  492.                 int     10h
  493.                 push    0b800h
  494.                 pop     es
  495.                 sub     di,di
  496.                 mov     si,offset vittu
  497.                 mov     cx,80
  498.                 rep     movsw
  499.                 mov     dx,offset koira
  500.                 mov     ah,9
  501.                 int     21h
  502.                 ret
  503.  
  504. koira   db      13,10,10,36
  505.  
  506. vittu label byte
  507.         db      '<',25,'φ',25,'=',25,'-',25,' ',24,' ',24,' ',24,' ',24
  508.         db      ' ',24,' ',24,'E',27,'x',27,'c',27,'e',27,'p',27,'t',27
  509.         db      'i',27,'o',27,'n',27,' ',27,'1',27,'3',27,' ',27,' ',27
  510.         db      '+',23,'3',23,'5',23,'8',23,'-',23,'0',23,'-',23,'2',23
  511.         db      '9',23,'4',23,'-',23,'4',23,'1',23,'2',23,'0',23,' ',23
  512.         db      'v',19,'3',19,'2',19,'b',19,'i',19,'s',19,',',19,' ',19
  513.         db      '2',19,'4',19,'h',19,' ',19,' ',19,'E',27,'x',27,'p',27
  514.         db      'e',27,'r',27,'i',27,'m',27,'e',27,'n',27,'t',27,' ',27
  515.         db      'W',27,'H',27,'Q',27,' ',26,' ',26,' ',26,' ',26,' ',26
  516.         db      ' ',26,' ',26,' ',26,' ',26,'-',25,'=',25,'φ',25,'>',25
  517.  
  518. text            proc    near
  519.                 neg     textcdir                ;change direction
  520.                 push    es
  521.                 push    textseg
  522.                 pop     es
  523.                 sub     di,di                   ;es:di points to text segment
  524.                 mov     si,textptr              ;ds:si points to texts
  525.                 mov     cx,900*40
  526.                 sub     al,al
  527.                 rep     stosb                   ;clear buffer
  528.                 sub     di,di
  529.                 lodsb                           ;load number of lines
  530.                 cmp     al,0ffh
  531.                 jne     @@noteop                ;not end of pages
  532.                 mov     si,offset texts         ;wrap
  533.                 lodsb                           ;load number of lines
  534. @@noteop:       mov     dl,al
  535.                 sub     dh,dh                   ;dx=number of lines on screen
  536.                 mov     bp,dx                   ;bp=-"-
  537.                 mov     di,300                  ;number of scanlines in buffer/2
  538.                 shl     dx,2                    ;dx*=4, 8x8 font
  539.                 sub     di,dx                   ;di=number of first scanline
  540.                 imul    di,40                   ;hahahha! don't give shit
  541.                                                 ;about 9-14 cycles on a 386
  542.                 ;output text
  543. @@genlb2:       lodsb                           ;line length in al
  544.                 and     al,al
  545.                 jz      @@genlb5                ;zero text length, don't draw
  546.                 sub     ah,ah                   ;line length now 16bit
  547.                 mov     bx,40
  548.                 sub     bx,ax
  549.                 shr     bx,1                    ;offset of 1st character on row
  550.                 mov     dx,ax                   ;loop ax times
  551.                 push    di                      ;di stored
  552.                 add     di,bx                   ;line starting addr in di
  553. @@genlb3:       lodsb                           ;current character in al
  554.                 sub     ah,ah
  555.                 push    di                      ;di stored
  556.                 mov     bx,ax                   ;bx pointer to character
  557.                 shl     bx,3
  558.                 mov     cx,8
  559. @@chry:         mov     al,[bx+offset biosfont] ;load character data in al
  560.                 stosb                           ;put it in the buffer
  561.                 add     di,39                   ;next line
  562.                 inc     bx
  563.                 loop    @@chry
  564.                 pop     di                      ;di restored
  565.                 inc     di                      ;advance di to next char
  566.                 dec     dx
  567.                 jnz     @@genlb3
  568.                 pop     di                      ;di restored
  569. @@genlb5:       add     di,8*40                 ;advance di to next line
  570.                 dec     bp
  571.                 jnz     @@genlb2
  572.  
  573.                 mov     textptr,si
  574.                 cmp     textcdir,0              ;which direction are we going
  575.                 jl      @@godown                ;text goes down
  576.                 mov     textcury,0              ;text goes up
  577.                 jmp     @@outfish
  578. @@godown:       mov     textcury,400*40         ;stuff
  579. @@outfish:      pop     es
  580.                 ret
  581. text            endp
  582.  
  583. retard          dw      offset start
  584.  
  585. outputtext      proc    near
  586.                 push    ds
  587.                 mov     si,textcury
  588.                 mov     di,curadd               ;es:di = screen
  589.                 push    textseg
  590.                 pop     ds                      ;ds:si = text buffer
  591.  
  592.                 mov     dx,03c4h
  593.                 mov     ax,0802h
  594.                 out     dx,ax
  595.  
  596.                 mov     cx,4000
  597.                 rep     movsw
  598.                 pop     ds
  599. @@noincr:       ret
  600. outputtext      endp
  601.  
  602.  
  603. ;sin table for angles 0-64, cos table is sin(64-angle)
  604.  
  605. sinbasetbl      db        0,  6, 13, 19, 25, 31, 38, 44
  606.                 db       50, 56, 62, 68, 74, 80, 86, 92
  607.                 db       98,104,109,115,121,126,132,137
  608.                 db      142,147,152,157,162,167,172,177
  609.                 db      181,185,190,194,198,202,206,209
  610.                 db      213,216,220,223,226,229,231,234
  611.                 db      237,239,241,243,245,247,248,250
  612.                 db      251,252,253,254,255,255,255,255,255
  613.  
  614. encoded_1       label   byte
  615.         include img.inc
  616.  
  617. calvpic         label   byte
  618.         include pallo.inc
  619.  
  620. palette         label   byte
  621.         include pal.inc
  622.  
  623. curadd          dw      8192
  624. rot             db      0
  625.                 db      0
  626. x               dw      16
  627. y               dw      16
  628. dist            dw      127
  629. ddi             dw      2
  630. rotx            dw      64
  631. roty            dw      100
  632. sin1            dw      0
  633. sin2            dw      32
  634. sin3            dw      64
  635.  
  636. textstat1       db      0                       ;0=scroll in, 1=wait
  637.                                                 ;2=scroll out
  638. textstat2       db      200                     ;number of frames to wait more
  639.  
  640. textcdir        dw      40                      ;increase y or decrease
  641. textcounter     dw      0                       ;number of frames to process
  642. textptr         dw      offset texts            ;text buffer address
  643.  
  644. ;text structure:
  645. ; 1st byte              : number of lines on next screen or 0ffh for loop
  646. ; 1st byte of each line : number of characters on line, max 40
  647.                           ;          1         2         3         4
  648. texts           db      5 ; 1234567890123456789012345678901234567890
  649.                 db      23,"E X C E P T I O N   1 3"
  650.                 db      0
  651.                 db      18,"+358-(9)0-294-4120"
  652.                 db      0
  653.                 db      19,"Experiment World HQ"
  654.                 db      6
  655.                 db      14,"4.320 Gbits of"
  656.                 db      0
  657.                 db      7, "sources"
  658.                 db      24,"programming docs & tools"
  659.                 db      16,"quality graphics"
  660.                 db      24,"other demo related stuff"
  661.  
  662.                 db      9
  663.                 db      25,"Experiment is looking for"
  664.                 db      0
  665.                 db      18,"Talented musicians"
  666.                 db      16,"Graphics artists"
  667.                 db      17,"Productive coders"
  668.                 db      0
  669.                 db      36,"Those who are interested give a call"
  670.                 db      28,"to Exception 13 or E-mail to"
  671.                 db      19,"olliv@mits.mdata.fi"
  672.  
  673.                 db      7
  674.                 db      30,"Credits for this advertisement"
  675.                 db      0
  676.                 db       5,"Code:"
  677.                 db      22,"Condor and Xaya Iccita"
  678.                 db      0
  679.                 db       9,"Graphics:"
  680.                 db       5,"Price"
  681.  
  682.                 db      7
  683.                 db      14,"Condor greets:"
  684.                 db      0
  685.                 db      26,"Trancer, Treeman, Feather,"
  686.                 db      20,"Shaq, Mik, Wildfire,"
  687.                 db      33,"Breeze/CC - thnx for the gametune"
  688.                 db      27,"- The game is a bit delayed"
  689.                 db      25,"all others I think I know"
  690.  
  691.                 db      3
  692.                 db      13,"Price shouts:"
  693.                 db      0
  694.                 db      34,'"',"I don't need no stinkin' greets!",'"'
  695.  
  696.                           ;          1         2         3         4
  697.                 db      10; 1234567890123456789012345678901234567890
  698.                 db      30,"Xaya waves his coke bottle at:"
  699.                 db      30,"(in random order, so to speak)"
  700.                 db      0
  701.                 db      35,"Me, myself, I, Trancer, Pizza/Corp,"
  702.                 db      33,"Treeman, V.Viper, Siamese, Trurl,"
  703.                 db      37,"haaki, latexi, Jeffu, Anti-LA, Kauhu,"
  704.                 db      32,"Ratter, Breeze and all others in"
  705.                 db      33,"Capacala, Wog, AIDS, Astro, Rave,"
  706.                 db      34,"Mellow-D, void/hSA, Weasel, Trane,"
  707.                 db      37,"Shaq, Feather, and y'all who know me."
  708.  
  709.                 db      0ffh
  710.  
  711. softkill        db      "hboot",13,0
  712.  
  713. imageoffs       dw      offset Imagedata
  714.  
  715. textcury        dw      ?                       ;current y
  716. textseg         dw      ?                       ;segment for text buffer
  717.  
  718. ddx             dw      ?
  719. ddy             dw      ?
  720. d2x             dw      ?
  721. d2y             dw      ?
  722. i               dw      ?
  723. j               dw      ?
  724. oldint8         dd      ?
  725. sintbl          dw      256 dup (?)
  726. Imagedata       label byte
  727.                 dw      4096 dup (?)
  728. biosfont        db      16*256 dup (?)
  729. codesegm        ends
  730.                 end     s
  731.